<?php
session_start();
date_default_timezone_set("Asia/Chongqing");
include("../../config/connect.php");
include("../../public/common.php");

$sitename = trim(isset($_POST['Site_Name']) ? $_POST['Site_Name'] : "");
$siteurl = trim(isset($_POST['Site_Url']) ? $_POST['Site_Url'] : "");
$sitelogo = trim(isset($_POST['Site_Logo']) ? $_POST['Site_Logo'] : "");
$sitetag = trim(isset($_POST['Site_Tag']) ? $_POST['Site_Tag'] : "");
$sitedes = trim(isset($_POST['Site_Descript']) ? $_POST['Site_Descript'] : "");
$untag = urldecode(trim(CheckUrlParamNoDie("untag")));
$nPage = SetUrlParamInt("page");

if(isset($_POST["Site_Submit"]))
{
	$sql = "select url from union_zz where url='$siteurl' limit 1";
	$result = mysql_query( $sql );
	if (mysql_num_rows($result) > 0)
	{
		// 如果该网站已经提交过了，提示改网站以提交
		echo "<script>alert('您提交网站已收录,如有疑问请联系QQ:985529898');window.history.go(-2);</script>";
	}else
	{
		$sql = "insert into union_zz (name,url,pic_url,type,descript) values ('$sitename', '$siteurl','$sitelogo', '$sitetag', '$sitedes')";
		mysql_query($sql);
		echo "<script>window.history.go(-1);</script>";
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
<meta name ="keywords" content="购物兔,购物兔返现网,购物兔省钱浏览器,聚划算返利,返现网,返利网,返利,淘宝网返利,商城返利,京东返利,淘宝网女装返利,淘宝网女鞋打折,淘宝网男装促销,淘宝网包包秒杀,淘宝化妆品赠送"/>
<meta name="Description" content="购物兔是国内最知名的购物省钱浏览器，返现最快，当天内直接到账，返现最安全，100%不漏单；无论您在淘宝网，还是京东、当当等其他商城购物，即使是促销价也能返现，实现折上再打折，真正省钱，是您网络购物省钱的首选！" />
<title>购物兔返现网-去淘宝网、京东、当当等商城购物，确认收货即可拿现金，赚兔币，换礼品！</title>
<LINK rel=stylesheet type=text/css href="../css/style.css">
<script language="javascript" src="../js/jquery.min.js"></script>
</head>
<body class="unionLM">
<div id="container">
	<!----头部搜索----->
	<div id="search" class="mid">
    	<form onsubmit="return Adjust('q')" method="get" action="../s/">
        <div id="nv">
        	<h1><a href="http://www.gouwutu.com"><img title="购物兔，返现就这么简单" alt="购物兔，返现就这么简单" src="../images/sslogo.gif"></a></h1>
    		<b>淘宝返利</b>
    		<a href="../mall">其他商城</a>
  		</div>
        <div id="fm">
          <p class="gwt_ss"><input type="text" value="输入您想要的宝贝名称或网址~" accesskey="s" onfocus="if(this.value=='输入您想要的宝贝名称或网址~'){this.value='';this.style.color = '#333';} this.select();" onblur="if(this.value==''){this.value='输入您想要的宝贝名称或网址~';this.style.color = '#BABABA';}" id="q" name="q" class="smallinput"></p>
          <p class="btn_wr"><input type="submit" value="" class="sssp" name="Submit"></p>
          <input type="hidden" value="" id="id" name="id">
          <input type="hidden" value="" id="url" name="url">
      	</div>
		</form>
        <div style=" position:absolute; top:76px; right:0; z-index:1111; background:url(../images/jg_bz.gif) no-repeat; width:307px; height:45px;"><a style="height:22px; width:66px; line-height:200px; display:block; overflow:hidden; margin:10px 0 0 234px;" href="http://www.gouwutu.com/faq/help_faq1_01.html#n1-1">更多详情</a></div>
    </div>
    <!----内容---->
    <div id="content">
    	<div id="weizhi" class="mt10">当前位置：<a href="http://www.gouwutu.com">首页</a> &gt; 站长联盟</div>
    	<div class="mall_ti mt10"><h2>站长联盟</h2></div>
        <div class="mt10 rim">
        	<div class="fl wh538">
                <div class="sort">
                    <h2 style="display:none;">网站分类</h2>
                    <div class="sort_con" style="border-top:1px solid #f2eeef;">
                        <ul>
                        <li><a href="union.php">全部网站</a>(<span>
						<?php 
							$contmp = mysql_fetch_assoc(mysql_query("select count(*) as tmp from union_zz where state = 1"));
							echo $contmp["tmp"];
							$allCount = $contmp["tmp"];
						?></span>)</li>
                        <?PHP 
						$unsql = "select type,count(*) as tmp from union_zz where state = 1 group by type";
						$unresult = mysql_query($unsql);
						//$unscunt = mysql_fetch_assoc($unresult);
						//$unsCount = $unscunt["tmp"];
						//echo $unsCount;
						while( $unresult && $uns = mysql_fetch_assoc($unresult))
						{
							echo '<li><a href="union.php?untag='.urlencode($uns["type"]).'">'.$uns["type"].'</a>(<span>'.$uns["tmp"].'</span>)</li>';
						}	
						?>
                        </ul>
                    </div>
                </div>
                <div class="sort mt10">
                    <h2>联盟细则</h2>
                    <div class="sort_con rules">
                    		<b>一：使用软件推广的渠道</b>
                        	<p>1、必须在安装过程中可选提示用户使用购物兔浏览器；</p>
                        	<p>2、不能强制或静默安装，用户可自行正常卸载购物兔浏览器；</p>
                        	<p>3、不能通过插件、病毒、强制捆绑等恶意方式推广；</p>
                        	<p>4、禁止其他使用户反感或违反法律法规的非正当方式推广。</p>
                        	<b>二：使用网站推广的渠道</b>
                        	<p>1、不能强制安装，用户可自行正常卸载购物兔浏览器；</p>
                        	<p>2、不能通过插件、病毒、强制捆绑等恶意方式推广；</p>
                        	<p>3、禁止其他使用户反感或违反法律法规的非正当方式推广。</p>
                        	<p>无论哪种合作方式，遵守以上推广规范都是合作的前提。</p>
                        	<b>产品特点：</b>
                        	<p>购物兔浏览器返利快、支持聚划算、返利流程直观、用户接受度高；</p>
                        	<p>软件大小只有1M多，返利操作更简捷；</p>
                        	<p>远高于软件行业平均推广佣金。</p>
                        	<p style="color:#F60; margin-top:10px; overflow:hidden;">有合作意向的站长请联系QQ：<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=985529898&amp;site=qq&amp;menu=yes"><img border="0" align="absmiddle" alt="点击和我们交流" src="http://wpa.qq.com/pa?p=2:985529898:42" title="欢迎点击和我们交流"></a>&nbsp;&nbsp;获取软件推广包。</p>
                            <p class="Setup"><a href="javascript:void(0);">立即加入</a></p>
                    </div>
                </div>
                <div class="Unbound" style="display:none;">
                   <div class="unss">
                        <div class="sel"><h2><span class="Close"><a href="javascript:void(0);">关闭</a></span>网站提交</h2></div>
                        <div class="ted">
                            <form action="" method="post" onsubmit="return sunbmintSS()">
                                <div class="ted_tj"><span>网站名称：</span><input  class="tedinp" style="width:160px;" type="text" maxlength="100" id="Site_Name" name="Site_Name" value=""></div>
                                <div class="ted_tj"><span>网站地址：</span><input  class="tedinp" style="width:360px;" type="text" maxlength="100" id="Site_Url" name="Site_Url" value="http://"></div>
                                <div class="ted_tj"><span>网站LOGO：</span><input  class="tedinp" style="width:360px;" type="text" maxlength="100" id="Site_Logo" name="Site_Logo" value="http://"></div>
                                <div class="ted_tj"><span>网站类型：</span><select  class="tedinp" name="Site_Tag" id="Site_Tag" size="1">
                                  <option value="请选择" selected='selected'>请选择</option>
                                  <option value="娱乐休闲">娱乐休闲</option>
                                  <option value="商业经济">商业经济</option>
                                  <option value="电脑网络">电脑网络</option>
                                  <option value="卫生健康">卫生健康</option>
                                  <option value="文学艺术">文学艺术</option>
                                  <option value="教育培训">教育培训</option>
                                  <option value="体育健身">体育健身</option>
                                  <option value="旅游交通">旅游交通</option>
                                  <option value="地方热线">地方热线</option>
                                  <option value="生活服务">生活服务</option>
                                  <option value="参考资料">参考资料</option>
                                  <option value="新闻媒体">新闻媒体</option>
                                  <option value="行业网站">行业网站</option>
                                  <option value="其它类别">其它类别</option>
                                </select>
                                </div>
                                <div class="ted_tj"><span>网站简介：</span><div><textarea cols="90" rows="3" id="Site_Descript" name="Site_Descript">您网站的介绍</textarea></div></div>
                                <p class="sz_btn"><input id="Site_Submit" name="Site_Submit" type="submit" value="提 交" /></p>
                                <span></span>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="fl wh390 ml10">
            	<div class="reveal">
                	<ul>
                    <?php
						$PAGE_SIZE = 24; //每页数量
           				$limit = " limit ". ($nPage)*$PAGE_SIZE .",$PAGE_SIZE"; 
						//$limit = " limit ". $nPage*2 .",2";
						$unsql = "select * from union_zz where state=1";
						if(isset($untag) && $untag != '')
							$unsql .= " and type='$untag'";
						$unsql .= " order by id desc".$limit;
						$unresult = mysql_query($unsql);
						$i = 0;
						while( $unresult && $uns = mysql_fetch_assoc($unresult))
						{
							echo "<li><a href='".$uns["url"]."' title='".$uns["descript"]."' target='_blank'><img src='".$uns["pic_url"]."' width='80' alt='".$uns["name"]."' /></a></li>"; 
						}
					?>
                    </ul>
                </div>
                <?PHP
				if(isset($untag) && $untag != '')
				{
					$contmps = mysql_fetch_assoc(mysql_query("select count(*) as tmp from union_zz where type='$untag' and state = 1"));
					$number = $contmps["tmp"];
				}else{
					$number = $allCount;
				}
				if ($number > $PAGE_SIZE) {
				?>
                <div class="pager">
                	<div id="pageNav">
                        <?php
						$all_page = floor($number / $PAGE_SIZE);
						
						if ($nPage > 0) echo "<a class='pageNext' href='?page=".($nPage-1)."&untag=$untag'>上一页</a>";
						
						if($all_page<=10){				
							for($i=0;$i<=$all_page;$i++){//数字分页
								$Pageshow = ($i!=$nPage)?"<a href='?page=$i&untag=$untag'>".($i+1)."</a>":"<b>".($i+1)."</b>";
								echo $Pageshow;
						  	}
						}else{
							for($i=0;$i<=10;$i++){//数字分页
								$Pageshow = ($i!=$nPage)?"<a href='?page=$i&untag=$untag'>".($i)."</a>":"<b>".($i+1)."</b>";
								echo $Pageshow;
						  	}
						}
						
						if($nPage == 10 || $nPage == floor($number / $PAGE_SIZE)){
							echo "";
						}else if($nPage < 10){
							echo "<a class='pageNext' href='?page=".($nPage+1)."&untag=$untag'>下一页</a>";
						}
						 ?>
            		</div>
             	</div>
                <?php } ?>
            </div>
            
        </div>
    </div>
</div>
<div style="overflow: hidden; width: 950px; margin:0 auto; padding:20px 0; text-align: center;">
	<p id="lh"><a target="_blank" href="http://www.gouwutu.com/download.php?opt=zip">下载购物兔</a> | <a target="_blank" href="http://www.gouwutu.com/union">加入购物兔联盟</a> | <a target="_blank" href="http://www.gouwutu.com/faq/help_faq1_01.html#n1-1">新手指导</a> | <a target="_blank" href="http://www.tusijie.com">兔丝街</a> | <a target="_blank" href="http://www.gouwutu.com/aboutus.html">关于购物兔</a></p>
    <p id="cp"> Copyright &copy;2008-2011  购物兔返利网  版权所有   <a href="http://www.miibeian.gov.cn" target="_blank">粤ICP备11009208号</a> </p>
</div>
</body>
</html>
<script type="text/javascript">
$(function(){
    var $title = $('.Unbound');
	$('.Setup a').click(function(){
		$title.css({"display":"block"});
	});
	$('.Unbound .sel a').click(function(){
		$title.css({"display":"none"});
	});
});

function sunbmintSS()
{
	var sitename = document.getElementById("Site_Name").value;
	var siteurl = document.getElementById("Site_Url").value;
	var sitelogo = document.getElementById("Site_Logo").value;
	var sitetag = document.getElementById("Site_Tag").value;
	
	if(sitename == "")
	{
		alert("请输入您的网站名称");
		//document.getElementById("Site_Name").focus();
		return false;
	}else if(siteurl == "http://" || siteurl == "")
	{
		alert("请输入您的网站地址");
		//document.getElementById( "Site_Url" ).focus();
		return false;
	}else if(sitelogo == "http://" || sitelogo == "")
	{
		alert("请输入您网站的LOGO链接地址");
		//document.getElementById( "Site_Logo" ).focus();
		return false;
	}else if(sitetag == "请选择")
	{
		alert("请选择您网站的类型");
		return false;
	}
	
	return true;
}
</script>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-20984072-1");
pageTracker._trackPageview();
} catch(err) {}</script>

<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F7eb75a7b189f4a709dead85bc20eb0dd' type='text/javascript'%3E%3C/script%3E"));
</script>